Skip to content

[ECMAScript6BestPractices] fix common-serve.js#2773

Closed
Pankraz76 wants to merge 9 commits intodiffplug:mainfrom
Pankraz76:fix-ECMAScript6BestPractices-fix-common-serve
Closed

[ECMAScript6BestPractices] fix common-serve.js#2773
Pankraz76 wants to merge 9 commits intodiffplug:mainfrom
Pankraz76:fix-ECMAScript6BestPractices-fix-common-serve

Conversation

@Pankraz76 Pankraz76 force-pushed the fix-ECMAScript6BestPractices-fix-common-serve branch 5 times, most recently from 1f6404a to b5775ec Compare November 28, 2025 16:06
@Pankraz76 Pankraz76 force-pushed the fix-ECMAScript6BestPractices-fix-common-serve branch 3 times, most recently from ca950be to 8533f98 Compare November 30, 2025 10:42
var format_data = req.body;
tsfmt.processString("spotless-format-string.ts", format_data.file_content, format_data.config_options).then(resultMap => {
/*
export interface ResultMap {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need this?

@Pankraz76 Pankraz76 marked this pull request as ready for review November 30, 2025 10:43
@Pankraz76 Pankraz76 force-pushed the fix-ECMAScript6BestPractices-fix-common-serve branch from 8533f98 to 78a5764 Compare November 30, 2025 11:09
Signed-off-by: Vincent Potucek <vpotucek@me.com>
@Pankraz76 Pankraz76 force-pushed the fix-ECMAScript6BestPractices-fix-common-serve branch from 78a5764 to cd3f993 Compare November 30, 2025 11:45
Vincent Potucek added 5 commits November 30, 2025 14:00
Signed-off-by: Vincent Potucek <vpotucek@me.com>
Signed-off-by: Vincent Potucek <vpotucek@me.com>
Signed-off-by: Vincent Potucek <vpotucek@me.com>
Signed-off-by: Vincent Potucek <vpotucek@me.com>
Signed-off-by: Vincent Potucek <vpotucek@me.com>

app.post("/shutdown", (req, res) => {
res.status(200).send("Shutting down");
setTimeout(async () => {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assuming if we fail here we still would have send out 200 before.

console.error("Error during shutdown:", err);
}
}, 200);
res.ok().send("Graceful shutdown.");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be safe to make this the last call. The only potential issue is if a third-party tool relies on the current log parsing, but that’s unlikely. We’re updating it to present tense for consistency with standard logging.

Vincent Potucek added 3 commits November 30, 2025 14:37
Signed-off-by: Vincent Potucek <vpotucek@me.com>
Signed-off-by: Vincent Potucek <vpotucek@me.com>
…-common-serve' into fix-ECMAScript6BestPractices-fix-common-serve

# Conflicts:
#	lib/src/main/resources/com/diffplug/spotless/npm/common-serve.js
'ReturnValueIgnored', // We don`t want to use ErrorProne's annotations.
)
error(
'ReturnValueIgnored',
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover.

@Pankraz76
Copy link
Author

consider reopen.

@Pankraz76 Pankraz76 closed this Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments